Hi, |
Re: crash on self-linkset creation Sorry for saying this. a) It is something easier to read the code if you use the tags of this forum-software. b) It is something easier to help you if we know the content of the error message you have had. Sometimes the content of an error message makes some sense. Best regards Wolfgang |
Re: crash on self-linkset creation SystemAdmin - Thu Feb 28 07:11:39 EST 2013
i am sorry, you are right! But i don't have the log of the error right now.
void CreateAutolink (Folder f,Module &lm) {
Item itm
string s_lm_prop=fullName lm
bool b_canCreateLink
if (null lm) {
printDebugInfo(s_lm_prop " non esiste\n", s_INFO,s_DebugINFO)
return
}
Folder f_child
for itm in f do {
if ((type(itm)=="Folder") ||(type(itm)=="Project")){
f_child=folder(fullName(itm))
CreateAutolink (f_child, lm)
}else if (type(itm)=="Formal") {
b_canCreateLink=false
if (canModify(lm)) {
b_canCreateLink=true
} else {
// se non posso modificare lm provo a chiuderlo e riaprirlo
lm=edit(s_lm_prop)
}
if (b_canCreateLink) {
//////CRASH HERE
create (lm,fullName(itm),fullName(itm))
addLinkModuleDescriptor(folder(path(itm)),fullName(itm),fullName(itm), false, s_lm_prop,"" )
printDebugInfo (name(itm) " autolink creation: OK\n", s_INFO,s_DebugINFO)
} else {
printDebugInfo (name(itm) " autolink creation: NOT OK (cannot modify " name lm ")\n", s_ERROR,s_DebugINFO)
}
}
}
}
Folder fcurr=current
Module lm_prop=edit("LINK MODULE FULL NAME",false)
CreateAutolink (fcurr,lm_prop)
//CRASH HERE
save lm_prop
close lm_prop
|
Re: crash on self-linkset creation SystemAdmin - Thu Feb 28 08:23:40 EST 2013
i am sorry, you are right! But i don't have the log of the error right now.
void CreateAutolink (Folder f,Module &lm) {
Item itm
string s_lm_prop=fullName lm
bool b_canCreateLink
if (null lm) {
printDebugInfo(s_lm_prop " non esiste\n", s_INFO,s_DebugINFO)
return
}
Folder f_child
for itm in f do {
if ((type(itm)=="Folder") ||(type(itm)=="Project")){
f_child=folder(fullName(itm))
CreateAutolink (f_child, lm)
}else if (type(itm)=="Formal") {
b_canCreateLink=false
if (canModify(lm)) {
b_canCreateLink=true
} else {
// se non posso modificare lm provo a chiuderlo e riaprirlo
lm=edit(s_lm_prop)
}
if (b_canCreateLink) {
//////CRASH HERE
create (lm,fullName(itm),fullName(itm))
addLinkModuleDescriptor(folder(path(itm)),fullName(itm),fullName(itm), false, s_lm_prop,"" )
printDebugInfo (name(itm) " autolink creation: OK\n", s_INFO,s_DebugINFO)
} else {
printDebugInfo (name(itm) " autolink creation: NOT OK (cannot modify " name lm ")\n", s_ERROR,s_DebugINFO)
}
}
}
}
Folder fcurr=current
Module lm_prop=edit("LINK MODULE FULL NAME",false)
CreateAutolink (fcurr,lm_prop)
//CRASH HERE
save lm_prop
close lm_prop
Then the answer is 47. |
Re: crash on self-linkset creation SystemAdmin - Thu Feb 28 08:46:06 EST 2013 |
Re: crash on self-linkset creation SystemAdmin - Thu Feb 28 08:49:10 EST 2013 Attachments attachment_14946300_untitled.jpg |
Re: crash on self-linkset creation SystemAdmin - Thu Feb 28 08:55:23 EST 2013 Attachments attachment_14946301_untitled.jpg |
Re: crash on self-linkset creation SystemAdmin - Thu Feb 28 08:55:55 EST 2013 Attachments attachment_14946302_untitled1.jpg |
Re: crash on self-linkset creation SystemAdmin - Thu Feb 28 08:56:00 EST 2013
Hi
[progress] Executing /Werkstattt/x.dxl
-E- DXL: <Line:14> incorrectly concatenated tokens
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:14> undeclared variable (s_DebugINFO)
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:14> undeclared variable (s_INFO)
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:14> undeclared variable (printDebugInfo)
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:34> incorrectly concatenated tokens
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:34> undeclared variable (s_DebugINFO)
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:34> undeclared variable (s_INFO)
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:34> undeclared variable (printDebugInfo)
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:36> incorrectly concatenated tokens
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:36> undeclared variable (s_DebugINFO)
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
too many messages -- suspending error reporting-I- DXL: All done. Errors reported: 12. Warnings reported: 0.
[progress] Done.
|
Re: crash on self-linkset creation SystemAdmin - Thu Feb 28 09:21:13 EST 2013
Hi
[progress] Executing /Werkstattt/x.dxl
-E- DXL: <Line:14> incorrectly concatenated tokens
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:14> undeclared variable (s_DebugINFO)
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:14> undeclared variable (s_INFO)
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:14> undeclared variable (printDebugInfo)
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:34> incorrectly concatenated tokens
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:34> undeclared variable (s_DebugINFO)
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:34> undeclared variable (s_INFO)
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:34> undeclared variable (printDebugInfo)
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:36> incorrectly concatenated tokens
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
-E- DXL: <Line:36> undeclared variable (s_DebugINFO)
Included from:
<c:\temp\DXLEditor\launcher_7951266244160592450.dxl:14>
<Line:1>
too many messages -- suspending error reporting-I- DXL: All done. Errors reported: 12. Warnings reported: 0.
[progress] Done.
|
Re: crash on self-linkset creation SystemAdmin - Thu Feb 28 10:11:28 EST 2013
Believe me the code does not crash.
[progress] Executing /Werkstattt/x.dxl
-R-E- DXL: <Line:11> null Module parameter was passed into argument position 1
Backtrace:
<Line:41>
-I- DXL: execution halted
[progress] Done.
|
Re: crash on self-linkset creation SystemAdmin - Thu Feb 28 10:11:28 EST 2013
Believe me the code does not crash.
[progress] Executing /Werkstattt/x.dxl
-R-E- DXL: <Line:11> null Module parameter was passed into argument position 1
Backtrace:
<Line:41>
-I- DXL: execution halted
[progress] Done.
|
Re: crash on self-linkset creation SystemAdmin - Thu Feb 28 10:25:45 EST 2013
Believe me the code does not crash.
[progress] Executing /Werkstattt/x.dxl
-R-E- DXL: <Line:11> null Module parameter was passed into argument position 1
Backtrace:
<Line:41>
-I- DXL: execution halted
[progress] Done.
As i told you this code is an extract of a bigger code. I want to ask, is there any further control on the link module before creating a linkset? Is there any circumstance that i can't create a self-linkset? |
Re: crash on self-linkset creation SystemAdmin - Thu Feb 28 10:41:27 EST 2013 Because the part you have posted is not complete. There is a "null" > I want to ask, is there any further control on the link module before creating a linkset? Avoid a null or - if it is not a null but an arbitrary value - avoid arbitrary input in your data. |
Re: crash on self-linkset creation SystemAdmin - Thu Feb 28 08:23:40 EST 2013
i am sorry, you are right! But i don't have the log of the error right now.
void CreateAutolink (Folder f,Module &lm) {
Item itm
string s_lm_prop=fullName lm
bool b_canCreateLink
if (null lm) {
printDebugInfo(s_lm_prop " non esiste\n", s_INFO,s_DebugINFO)
return
}
Folder f_child
for itm in f do {
if ((type(itm)=="Folder") ||(type(itm)=="Project")){
f_child=folder(fullName(itm))
CreateAutolink (f_child, lm)
}else if (type(itm)=="Formal") {
b_canCreateLink=false
if (canModify(lm)) {
b_canCreateLink=true
} else {
// se non posso modificare lm provo a chiuderlo e riaprirlo
lm=edit(s_lm_prop)
}
if (b_canCreateLink) {
//////CRASH HERE
create (lm,fullName(itm),fullName(itm))
addLinkModuleDescriptor(folder(path(itm)),fullName(itm),fullName(itm), false, s_lm_prop,"" )
printDebugInfo (name(itm) " autolink creation: OK\n", s_INFO,s_DebugINFO)
} else {
printDebugInfo (name(itm) " autolink creation: NOT OK (cannot modify " name lm ")\n", s_ERROR,s_DebugINFO)
}
}
}
}
Folder fcurr=current
Module lm_prop=edit("LINK MODULE FULL NAME",false)
CreateAutolink (fcurr,lm_prop)
//CRASH HERE
save lm_prop
close lm_prop
I've seen some wierd things when you both READ and MODIFY an input parameter. I think this is your problem. You can check "canModify" before you get to your function, remove the "&" from "&lm", and do NOT re-Edit the linkmodule. You want "canCreate" not "canModify". I'm paranoid and OCD. Try to set the current folder before messing around with this stuff.
-Louie |
Re: crash on self-linkset creation SystemAdmin - Thu Feb 28 10:45:02 EST 2013
for running the code you need to create a Link Module and write the full name in this instruction
Module lm_prop=edit("LINK MODULE FULL NAME",false)
|